guests=['father','mother','wmy']
print(f"I would like to invite {guests[0]},{guests[1]},{guests[2]} to come to my party")
#注意，如果这里{}中连用三个数据且中间用，隔开，会打印出（'father','mather','wmy')
print(f"{guests[2]} can't come to my party\n")
guests[2]="fucker"
print(f"{guests[2]} , welcome to my party!\n")
print(guests)#此处打印结果再次证明，即使用双引号，在列表中还会默认替换为单引号
print("I find a bigger table.\n")
guests.insert(0,'lover')
guests.insert(2,'hy')
guests.append('zsh')
print(f"{guests[0]},{guests[2]},{guests[5]},welcome to my party!")
print("Sorry,I only can invite two guests to come to my party.\n")
a=guests.pop(0)
print(f"fucking {a}")
b=guests.pop(1)
print(f'fucking {b}')
c=guests.pop(2)
print(f'fucking {c}')
d=guests.pop(2)
print(f"fucking {d}")
print(f"{guests[0],guests[1]},welcome to my party!")
del guests[0]
del guests[0]
print(guests)

#总结：insert方法可以随意插入元素，append方法只能在末尾查出元素
#      pop方法可以随意删除元素并保存
#      del语句可以随意删除元素但不保存
#      remove方法则是根据元素值删除